﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LEET.CommonInterfaces.TestControls;
using LEET.StandardModuals.Instructions;
using System.Windows.Automation;
using LEET.LEETCommon.WidgetLookup;
using Compiled_Tests;

namespace LEET.StandardModuals.Instructions
{
    public class LeftClickDrag : MouseAction
    {
        public LeftClickDrag(String[] args) : base(args) { }

        public static IAutomationActionResult StaticCall(IBox box, String source, String target)
        {
            AutomationElement s = WidgetFinder.Find(source, box.RootElement);
            AutomationElement t = WidgetFinder.Find(target, box.RootElement);
            MouseEvents.LeftClickDrag(s, t);
            return new AutomationActionResult();
        }

        public override String RenderStaticCall()
        {
            return "LEET.StandardModuals.Instructions.LeftClickDrag.StaticCall(Box, \"" + sourceElement + "\", \"" + targetElement + "\")";
        }

        public override string PlainText()
        {
            return "Mouse left drag click on element " + sourceElement + " to element " + targetElement;
        }
    }
}
